Integrand size = 25, antiderivative size = 202 \[ \int \frac {(f+g x) \left (a+b \log \left (c x^n\right )\right )^2}{(d+e x)^3} \, dx=-\frac {b (e f-d g) n x \left (a+b \log \left (c x^n\right )\right )}{d^2 e (d+e x)}+\frac {f^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 d^2 (e f-d g)}-\frac {(f+g x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 (e f-d g) (d+e x)^2}+\frac {b^2 (e f-d g) n^2 \log (d+e x)}{d^2 e^2}-\frac {b (e f+d g) n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {e x}{d}\right )}{d^2 e^2}-\frac {b^2 (e f+d g) n^2 \operatorname {PolyLog}\left (2,-\frac {e x}{d}\right )}{d^2 e^2} \]
-b*(-d*g+e*f)*n*x*(a+b*ln(c*x^n))/d^2/e/(e*x+d)+1/2*f^2*(a+b*ln(c*x^n))^2/ d^2/(-d*g+e*f)-1/2*(g*x+f)^2*(a+b*ln(c*x^n))^2/(-d*g+e*f)/(e*x+d)^2+b^2*(- d*g+e*f)*n^2*ln(e*x+d)/d^2/e^2-b*(d*g+e*f)*n*(a+b*ln(c*x^n))*ln(1+e*x/d)/d ^2/e^2-b^2*(d*g+e*f)*n^2*polylog(2,-e*x/d)/d^2/e^2
Time = 0.15 (sec) , antiderivative size = 244, normalized size of antiderivative = 1.21 \[ \int \frac {(f+g x) \left (a+b \log \left (c x^n\right )\right )^2}{(d+e x)^3} \, dx=\frac {-\frac {(e f-d g) \left (a+b \log \left (c x^n\right )\right )^2}{(d+e x)^2}-\frac {2 g \left (a+b \log \left (c x^n\right )\right )^2}{d+e x}+\frac {2 g \left (\left (a+b \log \left (c x^n\right )\right ) \left (a+b \log \left (c x^n\right )-2 b n \log \left (1+\frac {e x}{d}\right )\right )-2 b^2 n^2 \operatorname {PolyLog}\left (2,-\frac {e x}{d}\right )\right )}{d}+\frac {(e f-d g) \left (2 b d n \left (a+b \log \left (c x^n\right )\right )+(d+e x) \left (a+b \log \left (c x^n\right )\right )^2-2 b^2 n^2 (d+e x) (\log (x)-\log (d+e x))-2 b n (d+e x) \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {e x}{d}\right )-2 b^2 n^2 (d+e x) \operatorname {PolyLog}\left (2,-\frac {e x}{d}\right )\right )}{d^2 (d+e x)}}{2 e^2} \]
(-(((e*f - d*g)*(a + b*Log[c*x^n])^2)/(d + e*x)^2) - (2*g*(a + b*Log[c*x^n ])^2)/(d + e*x) + (2*g*((a + b*Log[c*x^n])*(a + b*Log[c*x^n] - 2*b*n*Log[1 + (e*x)/d]) - 2*b^2*n^2*PolyLog[2, -((e*x)/d)]))/d + ((e*f - d*g)*(2*b*d* n*(a + b*Log[c*x^n]) + (d + e*x)*(a + b*Log[c*x^n])^2 - 2*b^2*n^2*(d + e*x )*(Log[x] - Log[d + e*x]) - 2*b*n*(d + e*x)*(a + b*Log[c*x^n])*Log[1 + (e* x)/d] - 2*b^2*n^2*(d + e*x)*PolyLog[2, -((e*x)/d)]))/(d^2*(d + e*x)))/(2*e ^2)
Time = 0.56 (sec) , antiderivative size = 210, normalized size of antiderivative = 1.04, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {2798, 2804, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(f+g x) \left (a+b \log \left (c x^n\right )\right )^2}{(d+e x)^3} \, dx\) |
\(\Big \downarrow \) 2798 |
\(\displaystyle \frac {b n \int \frac {(f+g x)^2 \left (a+b \log \left (c x^n\right )\right )}{x (d+e x)^2}dx}{e f-d g}-\frac {(f+g x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 (d+e x)^2 (e f-d g)}\) |
\(\Big \downarrow \) 2804 |
\(\displaystyle \frac {b n \int \left (\frac {\left (a+b \log \left (c x^n\right )\right ) f^2}{d^2 x}+\frac {\left (d^2 g^2-e^2 f^2\right ) \left (a+b \log \left (c x^n\right )\right )}{d^2 e (d+e x)}-\frac {(d g-e f)^2 \left (a+b \log \left (c x^n\right )\right )}{d e (d+e x)^2}\right )dx}{e f-d g}-\frac {(f+g x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 (d+e x)^2 (e f-d g)}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {b n \left (-\left (\frac {f^2}{d^2}-\frac {g^2}{e^2}\right ) \log \left (\frac {e x}{d}+1\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {x (e f-d g)^2 \left (a+b \log \left (c x^n\right )\right )}{d^2 e (d+e x)}+\frac {f^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 b d^2 n}-b n \left (\frac {f^2}{d^2}-\frac {g^2}{e^2}\right ) \operatorname {PolyLog}\left (2,-\frac {e x}{d}\right )+\frac {b n (e f-d g)^2 \log (d+e x)}{d^2 e^2}\right )}{e f-d g}-\frac {(f+g x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 (d+e x)^2 (e f-d g)}\) |
-1/2*((f + g*x)^2*(a + b*Log[c*x^n])^2)/((e*f - d*g)*(d + e*x)^2) + (b*n*( -(((e*f - d*g)^2*x*(a + b*Log[c*x^n]))/(d^2*e*(d + e*x))) + (f^2*(a + b*Lo g[c*x^n])^2)/(2*b*d^2*n) + (b*(e*f - d*g)^2*n*Log[d + e*x])/(d^2*e^2) - (f ^2/d^2 - g^2/e^2)*(a + b*Log[c*x^n])*Log[1 + (e*x)/d] - b*(f^2/d^2 - g^2/e ^2)*n*PolyLog[2, -((e*x)/d)]))/(e*f - d*g)
3.5.55.3.1 Defintions of rubi rules used
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_)*(( f_) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(f + g*x)^(m + 1)*(d + e*x)^(q + 1)*((a + b*Log[c*x^n])^p/((q + 1)*(e*f - d*g))), x] - Simp[b*n*(p/((q + 1) *(e*f - d*g))) Int[(f + g*x)^(m + 1)*(d + e*x)^(q + 1)*((a + b*Log[c*x^n] )^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, q}, x] && NeQ[e*f - d*g, 0] && EqQ[m + q + 2, 0] && IGtQ[p, 0] && LtQ[q, -1]
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{ u = ExpandIntegrand[(a + b*Log[c*x^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] / ; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 0]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.77 (sec) , antiderivative size = 740, normalized size of antiderivative = 3.66
method | result | size |
risch | \(-\frac {b^{2} \ln \left (x^{n}\right )^{2} g}{e^{2} \left (e x +d \right )}+\frac {b^{2} \ln \left (x^{n}\right )^{2} d g}{2 e^{2} \left (e x +d \right )^{2}}-\frac {b^{2} \ln \left (x^{n}\right )^{2} f}{2 e \left (e x +d \right )^{2}}-\frac {b^{2} n \ln \left (x^{n}\right ) g}{e^{2} \left (e x +d \right )}+\frac {b^{2} n \ln \left (x^{n}\right ) f}{e d \left (e x +d \right )}-\frac {b^{2} n \ln \left (x^{n}\right ) \ln \left (e x +d \right ) g}{e^{2} d}-\frac {b^{2} n \ln \left (x^{n}\right ) \ln \left (e x +d \right ) f}{e \,d^{2}}+\frac {b^{2} n \ln \left (x^{n}\right ) \ln \left (x \right ) g}{e^{2} d}+\frac {b^{2} n \ln \left (x^{n}\right ) \ln \left (x \right ) f}{e \,d^{2}}-\frac {b^{2} n^{2} \ln \left (x \right )^{2} g}{2 e^{2} d}-\frac {b^{2} n^{2} \ln \left (x \right )^{2} f}{2 e \,d^{2}}-\frac {b^{2} n^{2} \ln \left (e x +d \right ) g}{e^{2} d}+\frac {b^{2} n^{2} \ln \left (e x +d \right ) f}{e \,d^{2}}+\frac {b^{2} n^{2} \ln \left (x \right ) g}{e^{2} d}-\frac {b^{2} n^{2} \ln \left (x \right ) f}{e \,d^{2}}+\frac {b^{2} n^{2} \ln \left (e x +d \right ) \ln \left (-\frac {e x}{d}\right ) g}{e^{2} d}+\frac {b^{2} n^{2} \ln \left (e x +d \right ) \ln \left (-\frac {e x}{d}\right ) f}{e \,d^{2}}+\frac {b^{2} n^{2} \operatorname {dilog}\left (-\frac {e x}{d}\right ) g}{e^{2} d}+\frac {b^{2} n^{2} \operatorname {dilog}\left (-\frac {e x}{d}\right ) f}{e \,d^{2}}+\left (-i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )+i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+2 b \ln \left (c \right )+2 a \right ) b \left (-\frac {\ln \left (x^{n}\right ) g}{e^{2} \left (e x +d \right )}+\frac {\ln \left (x^{n}\right ) d g}{2 e^{2} \left (e x +d \right )^{2}}-\frac {\ln \left (x^{n}\right ) f}{2 e \left (e x +d \right )^{2}}-\frac {n \left (\frac {\left (d g +e f \right ) \ln \left (e x +d \right )}{d^{2}}+\frac {d g -e f}{d \left (e x +d \right )}+\frac {\left (-d g -e f \right ) \ln \left (x \right )}{d^{2}}\right )}{2 e^{2}}\right )+\frac {{\left (-i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )+i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-i b \pi \operatorname {csgn}\left (i c \,x^{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^n)+I*b*Pi*csgn(I*c)*csgn(I*c*x^n)^2+I*b*Pi*c sgn(I*x^n)*csgn(I*c*x^n)^2-I*b*Pi*csgn(I*c*x^n)^3+2*b*ln(c)+2*a)^2*(-g/e^2 /(e*x+d)-1/2*(-d*g+e*f)/e^2/(e*x+d)^2)
\[ \int \frac {(f+g x) \left (a+b \log \left (c x^n\right )\right )^2}{(d+e x)^3} \, dx=\int { \frac {{\left (g x + f\right )} {\left (b \log \left (c x^{n}\right ) + a\right )}^{2}}{{\left (e x + d\right )}^{3}} \,d x } \]
integral((a^2*g*x + a^2*f + (b^2*g*x + b^2*f)*log(c*x^n)^2 + 2*(a*b*g*x + a*b*f)*log(c*x^n))/(e^3*x^3 + 3*d*e^2*x^2 + 3*d^2*e*x + d^3), x)
\[ \int \frac {(f+g x) \left (a+b \log \left (c x^n\right )\right )^2}{(d+e x)^3} \, dx=\int \frac {\left (a + b \log {\left (c x^{n} \right )}\right )^{2} \left (f + g x\right )}{\left (d + e x\right )^{3}}\, dx \]
\[ \int \frac {(f+g x) \left (a+b \log \left (c x^n\right )\right )^2}{(d+e x)^3} \, dx=\int { \frac {{\left (g x + f\right )} {\left (b \log \left (c x^{n}\right ) + a\right )}^{2}}{{\left (e x + d\right )}^{3}} \,d x } \]
a*b*f*n*(1/(d*e^2*x + d^2*e) - log(e*x + d)/(d^2*e) + log(x)/(d^2*e)) - a* b*g*n*(1/(e^3*x + d*e^2) + log(e*x + d)/(d*e^2) - log(x)/(d*e^2)) - (2*e*x + d)*a*b*g*log(c*x^n)/(e^4*x^2 + 2*d*e^3*x + d^2*e^2) - 1/2*(2*e*x + d)*a ^2*g/(e^4*x^2 + 2*d*e^3*x + d^2*e^2) - a*b*f*log(c*x^n)/(e^3*x^2 + 2*d*e^2 *x + d^2*e) - 1/2*a^2*f/(e^3*x^2 + 2*d*e^2*x + d^2*e) - 1/2*(2*b^2*e*g*x + (e*f + d*g)*b^2)*log(x^n)^2/(e^4*x^2 + 2*d*e^3*x + d^2*e^2) + integrate(( b^2*e^2*g*x^2*log(c)^2 + b^2*e^2*f*x*log(c)^2 + (2*(e^2*g*n + e^2*g*log(c) )*b^2*x^2 + (e^2*f*n + 3*d*e*g*n + 2*e^2*f*log(c))*b^2*x + (d*e*f*n + d^2* g*n)*b^2)*log(x^n))/(e^5*x^4 + 3*d*e^4*x^3 + 3*d^2*e^3*x^2 + d^3*e^2*x), x )
\[ \int \frac {(f+g x) \left (a+b \log \left (c x^n\right )\right )^2}{(d+e x)^3} \, dx=\int { \frac {{\left (g x + f\right )} {\left (b \log \left (c x^{n}\right ) + a\right )}^{2}}{{\left (e x + d\right )}^{3}} \,d x } \]
Timed out. \[ \int \frac {(f+g x) \left (a+b \log \left (c x^n\right )\right )^2}{(d+e x)^3} \, dx=\int \frac {\left (f+g\,x\right )\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{{\left (d+e\,x\right )}^3} \,d x \]